package com.sheepone.util.structure.node;

/**
 * @author Miss.杨
 * @description 单向节点
 * @since 2024/3/5 - 14:53
 */
public class UnidirectionalNode<T> extends ValueNode<T> {
    private UnidirectionalNode<T> next;

    public UnidirectionalNode() {
        super(null);
    }

    public UnidirectionalNode(T data) {
        super(data);
    }
    public UnidirectionalNode(T data, UnidirectionalNode<T> next) {
        super(data);
        this.next = next;
    }
    public UnidirectionalNode<T> getNext() {
        return next;
    }
    public void setNext(UnidirectionalNode<T> next) {
        this.next = next;
    }
}
